package com.sinder.campus_prophet.core.global;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;

import java.util.List;

/**
 * @author xyd
 * 封装一个分页函数
 */
@Data
@ToString
@ApiModel(value="Paper分页参数", description="分页参数")
public class Paper<T> {
    @ApiModelProperty(value = "当前页码",required = true)
    private long current; // 当前页码
    @ApiModelProperty(value = "总页数",required = true)
    private long pages; // 总页数
    @ApiModelProperty(value = "每条记录数",required = true)
    private long size; // 每条记录数
    @ApiModelProperty(value = "查询总记录数",required = true)
    private long total; // 查询总记录数
    @ApiModelProperty(value = "数据",required = true)
    private List<T> data;
}
